MIME Type List
The MovieImportGetMIMETypeList function returns a list of the MIME types supported by a movie import component. This list is contained in the QT atom container described in this section. For more information about QT atom containers, see the QuickTime Atom documentation.
At the top level of the atom container are three atoms for each supported MIME type. The atoms whose IDs are 1 describe the first supported MIME type, the atoms whose IDs are 2 describe the second supported MIME type, and so on.
-
An atom of type
kMimeInfoMimeTypeTag
contains a string that identifies the MIME type, such as
image/jpeg
or
image/x-jpeg
.
-
The atom of type
kMimeInfoFileExtensionTag
contains a string that specifies likely file extensions for files of this MIME type, such as
jpg
,
jpe
, and
jpeg
. If there is more than one extension, the extensions are separated by commas.
-
The atom of type
kMimeInfoDescriptionTag
contains a string describing the MIME type for end users, such as
JPEG Image
.
These atom types contain neither a Pascal nor a C string. The atom types are simply ASCII characters; an atom's size is the number of characters.
Figure 3
illustrates a MIME type list.
For best performance, include a public component resource of type
'mime'
and ID 1 with your exporter.
Figure 3
A MIME type list
Text Display Data Structure
The
TextDisplayData
structure contains formatting information for a text sample. When the text export component exports a text sample, it uses the information in this structure to generate the appropriate text descriptors for the sample. Likewise, when the text import component imports a text sample, it sets the appropriate fields in the text display data structure based on the sample's text descriptors.
struct TextDisplayData {
long displayFlags;
long textJustification;
RGBColor bgColor;
Rect textBox;
short beginHilite;
short endHilite;
RGBColor hiliteColor;
Boolean doHiliteColor;
SInt8 filler;
TimeValue scrollDelayDur;
Point dropShadowOffset;
short dropShadowTransparency;
};
typedef struct TextDisplayData TextDisplayData;
-
displayFlags
-
Contains flags that represent the values of the following text descriptors:
doNotDisplay
,
doNotAutoScale
,
clipToTextBox
,
useMovieBackColor
,
shrinkTextBox
,
scrollIn
,
scrollOut
,
horizontalScroll
,
reverseScroll
,
continuousScroll
,
flowHorizontal
,
dropShadow
,
anti-alias
,
keyedText
,
inverseHilite
,
continuousKaraoke
, and
textColorHilite
. For more information on the text sample display flags, see the Movie Toolbox documentation in the QuickTime 4 Reference and the description of the
AddTextSample
function in
Inside Macintosh: QuickTime
.
-
textJustification
-
Specifies the alignment of the text in the text box. Possible values are
teFlushDefault
,
teCenter
,
teFlushRight
, and
teFlushLeft
. For more information on text alignment and the text justification constants, see the "TextEdit" chapter of
Inside Macintosh: Text
.
-
bgColor
-
Specifies the background color of the rectangle specified by the
textBox
field. The background color is specified as an RGB color value.
-
textBox
-
Specifies the rectangle of the text box.
-
beginHilite
-
Specifies the one-based index of the first character in the sample to highlight.
-
endHilite
-
Specifies the one-based index of the last character in the sample to highlight.
-
doHiliteColor
-
Specifies whether to use the color specified by the
hiliteColor
field for highlighting. If the value of this field is
true
, the highlight color is used for highlighting. If the value of this field is
false
, reverse video is used for highlighting.
-
filler
-
Reserved.
-
scrollDelayDur
-
Specifies a scroll delay. The scroll delay is specified as the number of units of delay in the text track's time scale. For example, if the time scale is 600, a scroll delay of 600 causes the sample text to be delayed one second. In order for this field to take effect, scrolling must be enabled.
-
dropShadowOffset
-
Specifies an offset for the drop shadow. For example, if the point specified is (3,4), the drop shadow is offset 3 pixels to the right and 4 pixels down. In order for this field to take effect, drop shadowing must be enabled.
-
dropShadowTransparency
-
Specifies the intensity of the drop shadow as a value between 0 and 255. In order for this field to take effect, drop shadowing must be enabled.